package com.xyy.saas.payment.job.openAccount;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.xyy.elasticjob.client.annotation.ElasticJobConf;
import com.xyy.saas.payment.service.job.QueryOpenAccountJobService;
import com.xyy.saas.payment.util.JSONUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 查询开户意愿授权状态
 */
//@ElasticJobConf(name = "xyy.elastic.job.manage.QueryOpenAccountAuthorizeStatusJob", cron = "0 10,30,50 * * * ?")
@Slf4j
public class QueryOpenAccountAuthorizeStatusJob implements SimpleJob {
    @Autowired
    private QueryOpenAccountJobService queryOpenAccountJobService;

    @Override
    public void execute(ShardingContext shardingContext) {
        log.info("QueryOpenAccountAuthorizeStatusJob#execute start queryOpenAccountAuthorizeStatus.monitorOpenAccountAuthorizeStatus(), shardingContext:{}", JSONUtils.toJSON(shardingContext));
        queryOpenAccountJobService.monitorOpenAccountAuthorizeStatus();
        log.info("QueryOpenAccountAuthorizeStatusJob#execute end queryOpenAccountAuthorizeStatus.monitorOpenAccountAuthorizeStatus()");
    }
}
